Timm Bäder [Sun, 12 Apr 2020 08:40:21 +0000 (10:40 +0200)]
label: Remove a11y-only properties
Update them manually instead.
Timm Bäder [Sun, 12 Apr 2020 08:07:15 +0000 (10:07 +0200)]
label: Fold function into only caller
This makes it more obvious that gtk_label_setup_mnemonic() depends on
the root of the widget and it therefore makes sense to call it in
::root/::unroot.
Timm Bäder [Sun, 12 Apr 2020 08:04:30 +0000 (10:04 +0200)]
label: Don't normalize booleans in internal setters
We almost always pass a literal TRUE/FALSE to them.
Timm Bäder [Sun, 12 Apr 2020 07:46:03 +0000 (09:46 +0200)]
stylecontext: Remove get_pango_attributes
Make the only caller use GtkCssNode API.
Timm Bäder [Sun, 12 Apr 2020 07:22:38 +0000 (09:22 +0200)]
cssstyle: Only create PangoAttrList if there are attribtues
Don't allocate a new GString if we never need it and therefore don't
create the PangoAttrList if we have no attributes anyway. Update callers
to handle the possible NULL return value.
Timm Bäder [Sun, 12 Apr 2020 07:07:57 +0000 (09:07 +0200)]
label: Pull all pango attributes from the theme
Dont' force an underline attribute here. Just ask the theme for the
text-decoration.
Timm Bäder [Sun, 12 Apr 2020 06:38:34 +0000 (08:38 +0200)]
label: Fix an old TODO comment
Timm Bäder [Sun, 12 Apr 2020 06:36:36 +0000 (08:36 +0200)]
modelbutton: Emit ::clicked() before closing the popover
The clicked handler might still need the popover.
Timm Bäder [Sun, 12 Apr 2020 05:58:09 +0000 (07:58 +0200)]
label: Remove public pattern API
Timm Bäder [Fri, 10 Apr 2020 14:35:15 +0000 (16:35 +0200)]
label: Shorten set_markup_internal a bit
Timm Bäder [Fri, 10 Apr 2020 14:33:12 +0000 (16:33 +0200)]
label: Avoid duplicating a string
We only use str_for_accel if with_uline is TRUE.
Timm Bäder [Fri, 10 Apr 2020 14:29:32 +0000 (16:29 +0200)]
label: Pass <markup> length directly when parsing markup
Timm Bäder [Fri, 10 Apr 2020 14:23:32 +0000 (16:23 +0200)]
label: Remove a double if (needs_root) check
The code is clearer and shorter this way.
Timm Bäder [Fri, 10 Apr 2020 14:16:02 +0000 (16:16 +0200)]
label: Use widget API to add style class
Timm Bäder [Fri, 10 Apr 2020 14:04:20 +0000 (16:04 +0200)]
label: Clear select info before creating a new one
E.g. set_markup_internal will create a new select_info, but then we were
destroying it again, just to recreate it later.
Timm Bäder [Fri, 10 Apr 2020 14:03:37 +0000 (16:03 +0200)]
label: Save a few LOC
Timm Bäder [Fri, 10 Apr 2020 13:41:56 +0000 (15:41 +0200)]
label: Save links in an array
Stop using GList for this.
Timm Bäder [Fri, 10 Apr 2020 07:55:18 +0000 (09:55 +0200)]
widget: Return an array from list_devices
To forther reduce the GList usage in the code base.
Timm Bäder [Fri, 10 Apr 2020 07:54:02 +0000 (09:54 +0200)]
accelgroup: Restructure gtk_accelerator_name
To fix invalid reads and make the function a bit shorter while we're at
it.
Fixes #2602
Timm Bäder [Fri, 10 Apr 2020 06:17:46 +0000 (08:17 +0200)]
main: Stop using GList when propagating events
There are still some cases missing.
Matthias Clasen [Fri, 17 Apr 2020 12:37:45 +0000 (08:37 -0400)]
inspector: Fix a crash
Don't crash while picking. The event signal broke
when GdkEvent was turned into a type instance,
since the automatic marshallers don't know how to
deal with that. Manually set the right marshaller.
Matthias Clasen [Thu, 16 Apr 2020 20:36:24 +0000 (20:36 +0000)]
Merge branch 'event-types' into 'master'
Rework event types
Closes #2585
See merge request GNOME/gtk!1702
Emmanuele Bassi [Thu, 16 Apr 2020 16:23:36 +0000 (17:23 +0100)]
Restructure the GdkEvent type hierarchy
GdkEvent has been a "I-can't-believe-this-is-not-OOP" type for ages,
using a union of sub-types. This has always been problematic when it
comes to implementing accessor functions: either you get generic API
that takes a GdkEvent and uses a massive switch() to determine which
event types have the data you're looking for; or you create namespaced
accessors, but break language bindings horribly, as boxed types cannot
have derived types.
The recent conversion of GskRenderNode (which had similar issues) to
GTypeInstance, and the fact that GdkEvent is now a completely opaque
type, provide us with the chance of moving GdkEvent to GTypeInstance,
and have sub-types for GdkEvent.
The change from boxed type to GTypeInstance is pretty small, all things
considered, but ends up cascading to a larger commit, as we still have
backends and code in GTK trying to access GdkEvent structures directly.
Additionally, the naming of the public getter functions requires
renaming all the data structures to conform to the namespace/type-name
pattern.
Emmanuele Bassi [Thu, 16 Apr 2020 18:07:02 +0000 (19:07 +0100)]
Fix annotations for GtkEventController
Emmanuele Bassi [Thu, 16 Apr 2020 18:06:04 +0000 (19:06 +0100)]
Fix annotation for gtk_show_uri_full()
The callback is now an asynchronous closure.
Emmanuele Bassi [Thu, 16 Apr 2020 15:37:41 +0000 (16:37 +0100)]
Fix compiler warning
Newer versions of GCC are fairly aggressive with NULL checks.
Matthias Clasen [Thu, 16 Apr 2020 18:05:19 +0000 (18:05 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
themes: Fix HighContrast dependencies
See merge request GNOME/gtk!1701
Matthias Clasen [Thu, 16 Apr 2020 18:01:29 +0000 (18:01 +0000)]
Merge branch 'css-focus-changes' into 'master'
Add a focus-within state
See merge request GNOME/gtk!1700
Matthias Clasen [Thu, 16 Apr 2020 16:40:37 +0000 (12:40 -0400)]
themes: Fix HighContrast dependencies
HighContrast themes now depend on sass files from Adwaita.
Matthias Clasen [Thu, 16 Apr 2020 12:30:29 +0000 (08:30 -0400)]
Adwaita: Some adjustments for :focus-within
Use :focus-within for focus in entries, since the
actual focus is on the text within, and :focus for
notebooks, since we don't want to draw an outline
around the notebook when the focus is in content.
Matthias Clasen [Thu, 16 Apr 2020 16:09:54 +0000 (12:09 -0400)]
testsuite: Add some checks for focus states
This is some opportunistic checking in a test that
is really about focus chains, but better than nothing.
Matthias Clasen [Thu, 16 Apr 2020 05:36:13 +0000 (01:36 -0400)]
Add a focus-within state
This is used for widgets that contain the focus widget,
reserving the focused state for the focus location itself.
This aligns our focus state handling with
https://www.w3.org/TR/selectors-4/
Matthias Clasen [Thu, 16 Apr 2020 15:43:47 +0000 (15:43 +0000)]
Merge branch 'monitor-signals-x11' into 'master'
x11: emit ::enter/leave-monitor
See merge request GNOME/gtk!1699
Olivier Fourdan [Thu, 16 Apr 2020 10:58:39 +0000 (12:58 +0200)]
x11: emit ::enter/leave-monitor
For the X11 backend, keep a list of monitors for which the surface
intersects the monitor area.
Whenever the X11 surface is configured, check against the list of
monitors to determine whether it enters a new monitor or if it left a
monitor, to emit the corresponding ::enter/leave-monitor signals just
like a Wayland compositor would.
As monitors can be added, removed or reconfigured at any time, redo
those checks whenever any of these events occur.
Matthias Clasen [Thu, 16 Apr 2020 03:14:34 +0000 (23:14 -0400)]
Add :focus-visible to css docs
Matthias Clasen [Thu, 16 Apr 2020 03:09:36 +0000 (23:09 -0400)]
css: use :focus-visible instead of :focus(visible)
This is aligning our language with
https://www.w3.org/TR/selectors-4/
Matthias Clasen [Wed, 15 Apr 2020 22:26:25 +0000 (22:26 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
window: Don't set is-active twice
See merge request GNOME/gtk!1698
Matthias Clasen [Wed, 15 Apr 2020 21:08:15 +0000 (17:08 -0400)]
window: Don't set is-active twice
We are listening to focus change events for this
no need to duplicate the work in ::state-changed.
Matthias Clasen [Wed, 15 Apr 2020 19:28:32 +0000 (19:28 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
Closes #2612
See merge request GNOME/gtk!1695
Matthias Clasen [Wed, 15 Apr 2020 19:19:21 +0000 (15:19 -0400)]
Updates to NEWS
Matthias Clasen [Wed, 15 Apr 2020 18:56:32 +0000 (14:56 -0400)]
Move key event rewriting
Stop rewriting key and focus events on the GDK side.
Instead deliver them as they are, and propagate them
from the root on the gtk side, in gtkmain.c. And
stop complaining about focus events on popups - we
can just ignore them if we have no use for them.
Matthias Clasen [Wed, 15 Apr 2020 18:43:00 +0000 (14:43 -0400)]
window: Fix setting :is-active
We want to listen to focus events from the windowing
system here, relying on crossing events for this doesn't
work.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2612
Matthias Clasen [Wed, 15 Apr 2020 18:36:04 +0000 (14:36 -0400)]
eventcontroller: Fix signal marshallers
GdkEvent is no longer a GObject. Any signals taking
events as arguments need to have their marshallers
fixed. Thankfully, we have few of these left.
Jakub Steiner [Wed, 15 Apr 2020 17:21:32 +0000 (17:21 +0000)]
Merge branch 'wip/jimmac/drop-text-shadow' into 'master'
Adwaita: drop text shadows for buttons
Closes #2280
See merge request GNOME/gtk!1693
Jakub Steiner [Wed, 15 Apr 2020 13:27:17 +0000 (15:27 +0200)]
Adwaita: drop text shadows for buttons
- People seem to misunderstand the unsharp-mask-like increase
of visual contrast for "fuziness". That is not the reason for
the change. The stylistic change of just going with flat
text label allows to simplify the code and drop complexity.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2280
Matthias Clasen [Wed, 15 Apr 2020 16:23:14 +0000 (16:23 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1694
Jakub Steiner [Wed, 15 Apr 2020 15:47:14 +0000 (15:47 +0000)]
Merge branch 'wip/jimmac/checkradio-focus' into 'master'
Adwaita: check & radio focus ring
See merge request GNOME/gtk!1690
Jakub Steiner [Wed, 15 Apr 2020 15:47:09 +0000 (15:47 +0000)]
Merge branch 'wip/jimmac/active-state-for-checkradios' into 'master'
Adwaita: fix active state for radios & checkboxes
Closes #2493
See merge request GNOME/gtk!1689
Jakub Steiner [Wed, 15 Apr 2020 15:45:05 +0000 (15:45 +0000)]
Merge branch 'wip/jimmac/levelbar-punch' into 'master'
Adwaita: no edge highlight
Closes #2494
See merge request GNOME/gtk!1691
Matthias Clasen [Wed, 15 Apr 2020 15:36:09 +0000 (11:36 -0400)]
widget-factory: Add menu style class in popovers
We have a hand-rolled popover menu on page 3 that looks
really bad right now. Adding the menu style class makes
it all better.
Jakub Steiner [Wed, 15 Apr 2020 15:35:32 +0000 (15:35 +0000)]
Merge branch 'wip/jimmac/treeview-borders' into 'master'
Adwaita: slightly increase contrast for treeview borders
Closes #2238
See merge request GNOME/gtk!1692
Jakub Steiner [Wed, 15 Apr 2020 12:53:19 +0000 (14:53 +0200)]
Adwaita: slightly increase contrast for treeview borders
- sligtly increase contrast for the treeview borders
- FIXME: High Contrast seems to drop the borders completely,
there might be some trickery for using border-left-color and
border-top-color this way as even forcing the color 'red' seems
to render invisible on HC.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2238
Matthias Clasen [Wed, 15 Apr 2020 12:07:48 +0000 (08:07 -0400)]
docs: Small revision of input handling overview
Remove a vestigial touch events section.
Jakub Steiner [Wed, 15 Apr 2020 11:56:12 +0000 (13:56 +0200)]
Adwaita: no edge highlight
- Levelbars and progressbars are indicators, not controls. They don't
need no affordance signifier. Make it flat!
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2494
Jakub Steiner [Wed, 15 Apr 2020 11:45:59 +0000 (13:45 +0200)]
Adwaita: check & radio focus ring
- this slipped through Frederik's patch
Jakub Steiner [Wed, 15 Apr 2020 11:34:41 +0000 (13:34 +0200)]
Adwaita: fix active state for radios & checkboxes
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2493
Matthias Clasen [Wed, 15 Apr 2020 05:34:03 +0000 (05:34 +0000)]
Merge branch 'emoji-keynav' into 'master'
Emoji keynav
See merge request GNOME/gtk!1687
Matthias Clasen [Tue, 14 Apr 2020 19:27:34 +0000 (19:27 +0000)]
Merge branch 'arnaudb/fix-typo' into 'master'
Fix typo in IconTheme.
See merge request GNOME/gtk!1686
Matthias Clasen [Tue, 14 Apr 2020 12:40:08 +0000 (08:40 -0400)]
emojichooser: link sections for keynav
Make Up/Down jump between sections in the Emoji grid.
Matthias Clasen [Tue, 14 Apr 2020 19:03:57 +0000 (15:03 -0400)]
flowbox: Add a private api to disable move-cursor
Without this, it seems impossible to make cross-section
keynav in the Emoji chooser work. I've tried, but got
lost between the focus, grab_focus, move_cursor and
keynav-failed vfuncs and signals, and their competing
implementations GtkFlowBox and GtkEmojiChooser.
Matthias Clasen [Tue, 14 Apr 2020 17:29:49 +0000 (13:29 -0400)]
flowbox: Remove can-focus handling
With the new meaning of can-focus, this doesn't make
sense anymore.
Arnaud Bonatti [Tue, 14 Apr 2020 18:43:02 +0000 (20:43 +0200)]
Fix typo in IconTheme.
The add_search_path() method was
using the resource_path property
in place of the search_path one.
Matthias Clasen [Tue, 14 Apr 2020 01:44:09 +0000 (21:44 -0400)]
emojichooser: Improve keynav, again
When the focus is moved to one of the Emoji children,
scroll it into view.
Matthias Clasen [Tue, 14 Apr 2020 01:43:27 +0000 (21:43 -0400)]
emojichooser: Improve keynav
Add an action to scroll to the next or previous section,
and bind it to Ctrl-n/Ctrl-p.
Emin Tufan Çetin [Tue, 14 Apr 2020 16:09:12 +0000 (16:09 +0000)]
Update Turkish translation
Sabri Ünal [Tue, 14 Apr 2020 16:01:18 +0000 (16:01 +0000)]
Update Turkish translation
Matthias Clasen [Tue, 14 Apr 2020 14:07:54 +0000 (14:07 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1685
Matthias Clasen [Tue, 14 Apr 2020 14:00:42 +0000 (14:00 +0000)]
Merge branch 'library-versioning' into 'master'
build: Prepare library versioning
See merge request GNOME/gtk!1684
Matthias Clasen [Tue, 14 Apr 2020 13:15:31 +0000 (09:15 -0400)]
build: Prepare library versioning
Set version and soversion separately for the library.
When we do the 4.0 release, we will set:
gtk_soversion = '1'
gtk_library_version = '1.0.0'
See https://gitlab.gnome.org/GNOME/gtk/-/issues/1963
Matthias Clasen [Mon, 13 Apr 2020 23:24:13 +0000 (19:24 -0400)]
appchooserwidget: Drop the Private struct
Matthias Clasen [Mon, 13 Apr 2020 23:17:11 +0000 (19:17 -0400)]
lockbutton: Drop the Private struct
Matthias Clasen [Mon, 13 Apr 2020 22:19:55 +0000 (18:19 -0400)]
expander: Drop the Private struct
Matthias Clasen [Mon, 13 Apr 2020 22:10:22 +0000 (18:10 -0400)]
colorswatch: Drop the Private struct
Matthias Clasen [Mon, 13 Apr 2020 23:25:55 +0000 (23:25 +0000)]
Merge branch 'wip/matthiasc/monitor-signals' into 'master'
Add enter/leave signals for monitors
See merge request GNOME/gtk!1680
Matthias Clasen [Mon, 13 Apr 2020 23:21:57 +0000 (23:21 +0000)]
Merge branch 'use-gtk-doc-for-gtk4' into 'master'
Use gtk-doc from the gtk-doc-for-gtk4 branch
See merge request GNOME/gtk!1683
Matthias Clasen [Mon, 13 Apr 2020 20:40:57 +0000 (16:40 -0400)]
Always use gtk-doc as a subproject for now
We need the support for actions syntax, among
other things.
Matthias Clasen [Mon, 13 Apr 2020 20:40:11 +0000 (16:40 -0400)]
Switch the gtk-doc subproject to the gtk-doc-for-gtk4 branch
This branch contains assorted fixes and enhancements that
are needed to build the gtk4 docs.
Mathieu H [Mon, 13 Apr 2020 15:27:40 +0000 (15:27 +0000)]
Remove the blacklist list in convert-emoji.c since now it is supported
Aurimas Černius [Mon, 13 Apr 2020 19:43:30 +0000 (22:43 +0300)]
Updated Lithuanian translation
Matthias Clasen [Mon, 13 Apr 2020 13:29:11 +0000 (09:29 -0400)]
surface: Document coordinate systems a bit
Mention that sizes are in application pixels.
Also, remove some X11-specific docs.
Matthias Clasen [Mon, 13 Apr 2020 13:17:46 +0000 (09:17 -0400)]
inspector: Show scales other than 2
We were hardcoding that monitor scales can only be
1 or 2. Not true.
Matthias Clasen [Wed, 29 Nov 2017 03:37:42 +0000 (22:37 -0500)]
wayland: emit ::enter/leave-monitor
These signals directly mirror the surface_enter/leave events
of the Wayland protocol, so this is very staightforward.
Matthias Clasen [Wed, 29 Nov 2017 03:36:17 +0000 (22:36 -0500)]
gdk: Add ::enter/leave-monitor signals
These are useful to keep track of what monitors a window is on.
Matthias Clasen [Mon, 13 Apr 2020 11:15:14 +0000 (11:15 +0000)]
Merge branch 'modal-buttons' into 'master'
Modal buttons
See merge request GNOME/gtk!1679
Matthias Clasen [Mon, 13 Apr 2020 04:46:00 +0000 (00:46 -0400)]
appchooserbutton: Drop the Private struct
Matthias Clasen [Mon, 13 Apr 2020 04:43:19 +0000 (00:43 -0400)]
Add a GtkAppChooserButton:modal property
Nowadays, dialogs are expected to be attached, typically,
and that only happens when they are marked as modal.
Matthias Clasen [Mon, 13 Apr 2020 04:32:50 +0000 (00:32 -0400)]
fontbutton: Drop the Private struct
Matthias Clasen [Mon, 13 Apr 2020 04:28:34 +0000 (00:28 -0400)]
Add a GtkFontButton:modal property
Nowadays, dialogs are expected to be attached, typically,
and that only happens when they are marked as modal.
Matthias Clasen [Mon, 13 Apr 2020 04:28:11 +0000 (00:28 -0400)]
colorbutton: Drop the Private struct
Matthias Clasen [Mon, 13 Apr 2020 04:17:00 +0000 (00:17 -0400)]
Add a GtkColorButton:modal property
Nowadays, dialogs are expected to be attached, typically,
and that only happens when they are marked as modal.
Matthias Clasen [Mon, 13 Apr 2020 04:12:30 +0000 (00:12 -0400)]
filechooserbutton: Make dialog modal by default
This is the expected behavior, so default to it.
Matthias Clasen [Mon, 13 Apr 2020 03:57:49 +0000 (23:57 -0400)]
filechooserbutton: Drop the Private struct
Matthias Clasen [Mon, 13 Apr 2020 03:45:03 +0000 (23:45 -0400)]
Add a GtkFileChooserButton:modal property
Nowadays, dialogs are expected to be attached, typically,
and that only happens when they are marked as modal.
Matthias Clasen [Mon, 13 Apr 2020 03:42:26 +0000 (03:42 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Adwaita: visible focus outline for color swatches
See merge request GNOME/gtk!1678
Matthias Clasen [Mon, 13 Apr 2020 02:18:50 +0000 (22:18 -0400)]
window: Make resize cursors work for modal dialogs
We were inadvertedly not letting the grab_widget determine
a cursor. This was showing up as resize cursors not appearing.
Matthias Clasen [Mon, 13 Apr 2020 01:58:07 +0000 (21:58 -0400)]
gtk-demo: Group the OpenGL demos
Matthias Clasen [Mon, 13 Apr 2020 00:39:03 +0000 (20:39 -0400)]
gtk-demo: Add a gears demo
Matthias Clasen [Mon, 13 Apr 2020 00:13:16 +0000 (20:13 -0400)]
Adwaita: visible focus outline for color swatches
Make the focus outline for color swatches visible
again.
Matthias Clasen [Sun, 12 Apr 2020 22:53:54 +0000 (22:53 +0000)]
Merge branch 'arnaudb/better-substitution' into 'master'
Fix some gtk-builder-tool substitutions.
See merge request GNOME/gtk!1675
Matthias Clasen [Sun, 12 Apr 2020 22:07:20 +0000 (22:07 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
text: Fix placing the cursor on click
See merge request GNOME/gtk!1673